Method, system, and computer readable medium for controlling automatic focusing of a digital camera

ABSTRACT

A method, system and computer readable medium for an automatic focusing device including an optical system including receiving a light flux from an object to be photographed, the received light flux being passed through an optical system having a focusing lens system to form an image of the object and converting the received light flux into an output image signal; converting the image signal to output digital image data; outputting luminance data according to the digital image data as an automatic exposure (AE) evaluation value; setting at least an area of an imaging screen of an imaging device as an automatic focusing (AF) area; determining if the AE evaluation value is smaller than a predetermined value and setting an enlarged AF area as the AF area when the AE evaluation value is smaller than the predetermined value; integrating high frequency components of luminance data of image data in the AF area and outputting resulting data as an AF evaluation value; sampling AF evaluation values while moving the focusing lens system; and determining if the device is in focus based upon a result of the sampled AF evaluation values and driving the focusing lens system to a focusing position when the device is not in focus.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to an automatic focusing device,and more particularly to an automatic focusing device for a digitalcamera.

[0003] 2. Discussion of the Background

[0004] An automatic focusing device for a digital camera is known, inwhich a high frequency component of an image signal, which is obtainedby an imaging device, such as a charged coupled device (CCD), is passedthrough a high band pass filter (HPF) or band pass filter (BPF). Digitalvalues according to the intensity of the image signals passed throughthe HPF or BPF are integrated so as to generate a focus evaluation valuefor each predetermined period of time (e.g., for one field). Then, thedistance between a focusing lens and the imaging device is controlledsuch that the focus evaluation value becomes a peak value.

[0005] In such an automatic focusing device, generally, an area in animaging area of the imaging device, which is used for determining thefocus evaluation value and which is called an automatic focusing (AF)area, is located in the center part of the imaging area and has apredetermined fixed size.

[0006] The above-described focusing device has a deficiency in that animage which a photographer desires to photograph necessarily may not bein focus, if the AF area is large. For example, when a plurality ofimages which are located at different respective distances arephotographed, the image which the photographer desires to focustypically may not be focused. Also, when the background of an image tobe photographed is high in contrast relative to the image, thebackground of the image is focused depending upon, for example, a ratiobetween the image and the background in the AF area.

[0007] On the other hand, if the AF area is made small, even if an imagelocated in the center of the AF area is intended to be focused, theimage easily moves out of the AF area when the camera is moved or if theimage itself slightly moves, which results in inaccurate focusing.

SUMMARY OF THE INVENTION

[0008] Accordingly, it is an object of the present invention to providea novel and improved automatic focusing device for a digital camera thatis capable of accurately focusing even when an image to be photographedis dark or low in contrast.

[0009] The above and other objects are achieved according to the presentinvention by providing a new and improved method, system and computerreadable medium for controlling an automatic focusing device of adigital camera including receiving a light flux from an object to bephotographed, the received light flux being passed through an opticalsystem having a focusing lens system to form an image of the object andconverting the received light flux into an output image signal;converting the image signal to output digital image data; outputtingluminance data according to the digital image data as an automaticexposure (AE) evaluation value; setting at least an area of an imagingscreen of an imaging device as an automatic focusing (AF) area;determining if the AE evaluation value is smaller than a predeterminedvalue and setting an enlarged AF area as the AF area when the AEevaluation value is smaller than the predetermined value; integratinghigh frequency components of luminance data of image data in the AF areaand outputting resulting data as an AF evaluation value; sampling AFevaluation values while moving the focusing lens system; and determiningif the device is in focus based upon a result of the sampled AFevaluation values and driving the focusing lens system to a focusingposition when the device is not in focus.

[0010] Another embodiment includes a method, system and computerreadable medium for controlling an automatic focusing device of adigital camera including receiving a light flux from an object to bephotographed, the received light flux being passed through an opticalsystem having a focusing lens system to form an image of the object andconverting the received light flux into an output image signal;converting the image signal to output digital image data; outputtingluminance data according to the digital image data as an automaticexposure (AE) evaluation value; setting at least an area of an imagingscreen of an imaging device as an automatic focusing (AF) area;integrating high frequency components of luminance data of image data inthe AF area and outputting resulting data as an AF evaluation value;sampling AF evaluation values while moving the focusing lens system; anddetermining if the device is in focus based upon a result of the sampledAF evaluation values and driving the focusing lens system to a focusingposition when the device is not in focus; and setting an enlarged AFarea as the AF area before sampling the AF evaluation values when the AFevaluation value is smaller than a predetermined value.

[0011] Another embodiment includes a method, system and computerreadable medium for controlling an automatic focusing device of adigital camera including receiving a light flux from an object to bephotographed, the received light flux being passed through an opticalsystem having a focusing lens system to form an image of the object andconverting the received light flux into an output image signal;amplifying the image signal with a variable gain; converting the imagesignal to output digital image data; outputting luminance data accordingto the digital image data as an automatic exposure (AE) evaluationvalue; integrating high frequency components of luminance data of imagedata in an automatic focusing (AF) area and outputting resulting data asan AF evaluation value; sampling AF evaluation values while moving thefocusing lens system; determining if the device is in focus based upon aresult of the sampled AF evaluation values and driving the focusing lenssystem to a focusing position when the device is not in focus; andcontrolling the variable gain to increase the variable while samplingthe AF evaluation values and when the AE evaluation value is smallerthan a predetermined value.

[0012] Another embodiment includes a method, system and computerreadable medium for controlling an automatic focusing device of adigital camera including receiving a light flux from an object to bephotographed, the received light flux being passed through an opticalsystem having a focusing lens system to form an image of the object andconverting the received light flux into an output image signal;amplifying the image signal with a variable gain; converting the imagesignal to output digital image data; outputting luminance data accordingto the digital image data as an automatic exposure (AE) evaluationvalue; integrating high frequency components of luminance data of imagedata in an automatic focusing (AF) area and outputting resulting data asan AF evaluation value; sampling AF evaluation values while moving thefocusing lens system; determining if the device is in focus based upon aresult of the sampled AF evaluation values and driving the focusing lenssystem to a focusing position when the device is not in focus; andcontrolling the variable gain to increase the variable while samplingthe AF evaluation values, when the AF evaluation value is smaller than apredetermined value before the sampling the AF evaluation values.

[0013] Another embodiment includes a method, system and computerreadable medium for controlling an automatic focusing device of adigital camera including receiving a light flux from an object to bephotographed, the received light flux being passed through an opticalsystem having a focusing lens system to form an image of the object andconverting the received light flux into an output image signal;converting the image signal to output digital image data; outputtingluminance data according to the digital image data as an automaticexposure (AE) evaluation value; integrating high frequency components ofluminance data of image data in an automatic focusing (AF) area andoutputting resulting data as an AF evaluation value; sampling AFevaluation values while moving the focusing lens system; determining ifthe device is in focus based upon a result of the sampled AF evaluationvalues and driving the focusing lens system to a focusing position whenthe device is not in focus; controlling an AE control operation inaccordance with the AE evaluation value; setting the AE evaluation valuefor the AF area independently from the AE control operation; andexecuting an AF operation after the AE operation for the AF area.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014] A more complete appreciation of the invention and many of theattendant advantages thereof will be readily obtained as the samebecomes better understood by reference to the following detaileddescription when considered in connection with the accompanyingdrawings, wherein:

[0015]FIG. 1 is a block diagram illustrating the structure of anexemplary digital camera including an automatic focusing deviceaccording to the present invention;

[0016]FIG. 2 is a block diagram illustrating an example of an imagepre-processor of the camera shown in FIG. 1;

[0017]FIG. 3 is a graph illustrating a relation between a controlvoltage and a measured gain of a variable gain amplifier of the camerashown in FIG. 1;

[0018]FIG. 4 is a diagram illustrating an exemplary construction of alight receiving area of a CCD as an imaging device;

[0019]FIG. 5 is a diagram illustrating an exemplary automatic exposure(AE) area used for an automatic exposure control;

[0020]FIG. 6 is a diagram illustrating an exemplary automatic focusing(AF) area used for an automatic focusing control;

[0021]FIG. 7 is a diagram illustrating another AF area used for theautomatic focusing control;

[0022]FIG. 8 is a flowchart for explaining an AF area setting operation;and

[0023]FIG. 9 is a flowchart for explaining an AE control operation whichis executed while the AF control operation is being executed.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0024] While the present invention will hereinafter be described inconnection with preferred embodiments thereof, it will be understoodthat it is not intended to limit the invention to these embodiments. Onthe contrary, it is intended to cover all alternatives, modificationsand equivalents wherein the spirit and scope of the invention areincluded. Furthermore, in the drawings, like reference numerals havebeen used throughout the drawings to identify identical elements.

[0025]FIG. 1 shows an example of the overall construction of a digitalcamera including an automatic focusing device to which the presentinvention is applied. A digital camera 100 includes a lens system 101,an optic mechanical system 102 including an aperture, a filter, and soforth, a charge coupled device (CCD) 103 as an imaging device, acorrelate dual sampling (CDS) circuit 104, a variable gain control (VG)amplifier 105, an analog to digital (A/D) converter 106, an imagepre-processor (IPP) 107, a discrete cosine transformer (DCT) 108, aHuffman encoder/decoder 109, a memory card controller (MCC) 110, adynamic random-access memory (DRAM) 111, a memory card interface circuit112, a central processing unit (CPU) 121, a display panel 122, anoperation panel 123, a device control signal generator (SG) 126, astrobe flash 127, a battery 128, a DC-DC converter 129, an electricalerasable programmable read only memory (EEPROM) 130, a focus driver 131,a stepping motor 132 for focusing, a zoom driver 133, a stepping motor134 for zooming, and a motor driver 135. A memory card 150 can beattached to the camera 100 via the memory card interface circuit 112,and an optional remote control unit (not shown) may be included in thecamera 100.

[0026] The lens unit of the camera 100 includes the lens system 101 andthe optic mechanical system 102. An electronically controlled mechanicalshutter that is provided inside the optic mechanical system 102simultaneously exposes both of two interlaced field images to form acomplete raster image of the two field images. The lens system 101comprises, for example, a variable focal lens which is composed of afocus lens 101 a and a zoom lens 101 b.

[0027] The focus driver 131 drives the stepping motor 132 for focusingaccording to a control signal provided by the CPU 121 to move the focallens 101 a along its optical axis. The zoom driver 133 drives thestepping motor 134 for zooming in accordance with a control signalprovided by the CPU 121 to move the zoom lens 101 b along its opticalaxis. The motor driver 135 drives the optic mechanical system 102according to a control signal provided by the CPU 121, for example, toset an aperture value.

[0028] The CCD imaging device 103 converts optical images, which areinput thereto via the lens unit, into analog electrical signals. The CDScircuit 104 reduces noise of the analog electrical signals, and therebyenhances the image quality resulting from the electrical signals. TheCDS circuit 104 is particularly tuned to reduce inherent CCD sensornoises, such as thermal noise.

[0029] The VG amplifier 105 corrects the amplitude of an analogelectrical signal that has been processed by the CDS circuit 104 into apredetermined amplitude. The gain level of the VG amplifier 105 is setby the CPU 121. The CPU 121 first reads digital data, which is providedinside the EEPROM 130 and which defines a relation between a controlvoltage and a measured gain of the VG amplifier 105, and inputs the readdata to a digital to analog (D/A) converter (not shown) built in the CPU121 to convert the read data to an analog voltage, which is then set atthe VG amplifier 105. The A/D converter 106 converts the analog imagedata from the VG amplifier 105 into digital image data. The A/Dconverter 106 converts the data with an optimum sampling frequency, suchas, for example, a multiple number of the sub-carrier frequency of theNTSC signal format.

[0030] The IPP 107, the DCT 108, and the Huffman encoder/decoder 109,functioning as a digital signal processor, separate the digital datawhich is input from the A/D converter 106 into color-difference data andluminance data, and then perform various processes on the separated dataincluding processes for correcting and converting the separated datainto optimum data for compression/decompression. The Huffmanencoder/decoder 109 carries out, for example, an orthogonaltransformation and a Huffman encoding/decoding for the original digitaldata, which are required in data compression and expansion in the JointPhotographic Expert Group (JPEG) standard.

[0031] The memory card controller (MCC) 110 temporarily stores encodeddata therein and then writes the data in the memory card 150 through thememory card interface circuit 112. The MMC 110 also reads out storeddata from the memory card 150.

[0032] The CPU 121 controls operation of the camera 100 according toinstructions input through the operation panel 123 or from the outsideof the camera 100, for example, through the optional remote control unit(not shown). The CPU 121 executes the control of the operation of thecamera 100 in accordance with a series of program codes (instructions),which are stored in a ROM (not shown) internal to the CPU 121, using aRAM (not shown) internal to the CPU 121 as a working area. Morespecifically, the CPU 121 controls a photographing operation, anautomatic exposure (AE) control operation, an automatic white balancing(AWB) operation, and an automatic focusing (AF) operation.

[0033] Power to the camera 100 is input to the DC to DC converter 129from the battery 128, which includes, for example, a nickel cadmiumbattery, a nickel hydrogen battery, or a lithium battery. The voltage isconverted to an appropriate level by the DC to DC converter 129 and thensupplied to the entire camera 100 system.

[0034] The display panel 122 includes, for example, a liquid crystaldisplay, a light emitting diode display or an electronic luminescencedisplay, etc. The display panel 122 displays an image of digital imagedata of a photograph just taken or an image of image data which iscompressed and stored in the memory card 150. The operation panel 123 isprovided with a plurality of buttons for selecting desired functions andinputting instructions for setting photographing conditions. Inaddition, the EEPROM 130 contains parameters which the CPU 121 uses inexecuting the above-mentioned controls.

[0035] The camera 100 provides three operational modes, for example,including a monitoring mode, a photographing/recording mode and adisplaying mode. The monitoring mode enables displaying an imagephotographed by the CCD 103 in the display panel 122 before recordingthe image in the memory card 150. The photographing/recording modeenables photographing an image and storing resulting image data into thememory card 150. The displaying mode enables reading out of stored imagedata from the memory card 150 and displaying images of the data on thedisplay panel 122.

[0036]FIG. 2 is a block diagram illustrating an example of the imagepre-processor (IPP) 107. A color separation module 1071 separatesdigital image data from the A/D converter 106 into a set of red (R),green (G), and blue (B) data. A signal interpolation module 1072interpolates new data in each of the separated R, G, and B data. Apedestal level adjustment module 1073 adjusts a black level of each ofthe R, G, and B data. A white level adjustment module 1074 adjusts awhite level of each of the R, G, and B data. A digital gain controlmodule 1075 adjusts a signal level of each of the R, G, and B data witha gain which is set by the CPU 121. A gamma control module 1076 convertsa gamma of each of the R, G, and B data into another gamma. A matrixmodule 1077 converts the set of R, G, and B data into color-differencesignals (Cb and Cr) and a luminance signal (Y). A video signalprocessing module 1078 converts the Cb, Cr, and Y signals into NTSCformat video signals, respectively, and sends out these signals to thedisplay panel 122.

[0037] A first arithmetic module 1079 detects the intensity of aluminance signal which is output from the pedestal level adjustmentmodule 1073. A band pass filter (BPF) 1080 passes a specific frequencyband of the luminance signal detected by the first arithmetic module1079. An automatic focusing (AF) evaluation circuit 1081 calculates theintegral of digital values according to the luminance signals passed theBPF 1080, and outputs the integral to the CPU 121 as an AF evaluationvalue. An automatic exposure (AE) evaluation circuit 1082 calculates adigital value (described below) according to the intensity of theluminance signal which is detected by the first arithmetic module 1079and outputs the value to the CPU 121 as an AE evaluation value. An AEevaluation value represents a difference between the exposure value foran optimum exposure for the sensitivity of the CCD 103 and the exposurevalue according to the time value (shutter speed) and the aperture valuearbitrarily set in an automatic exposure operation. A second arithmeticmodule 1083 detects the intensity of a luminance signal of each of theR, G, and B data which is adjusted by the white level adjustment module1074. An automatic white balance (AWB) evaluation circuit 1084 countseach of the luminance data of R, G, and B and outputs the data to theCPU 121 as an AWB evaluation value for each color. A CPU interfacecircuit 1085 is an interface between the IPP 107 and the CPU 121. A DCTinterface circuit 1086 works as an interface between the IPP 107 and theDCT 108.

[0038]FIG. 3 is a graph illustrating a relation between a controlvoltage and a measured gain of the VG amplifier 105. The horizontal axisrepresents the control voltage and the vertical axis represents themeasured gain of the VG amplifier 105, respectively. The datarepresenting this relation is stored in the EEPROM 130.

[0039]FIG. 4 illustrates an exemplary construction of a light receivingarea of the CCD 103. As illustrated in FIG. 4, CCD elements are arrangedin a matrix form, for example, a matrix of 640×480 CCD elements.Furthermore, in this example, the CCD elements are further divided intoblocks of 80×80 CCD elements.

[0040]FIG. 5 illustrates an example of an AE area used for an automaticexposure control, which is composed of the light receiving area of theCCD 103. The light receiving area of the CCD 103 is divided into 6 areasso as to form sub-AE areas 1-6. The sub-AE area 6 is within the sub-AEarea 5. Each of the sub-AE areas 1-4 form a rectangle and a part of eachof the sub-AE areas 1-4 overlaps the sub-AE areas 5 and 6, respectively.

[0041] The AE evaluation circuit 1082 calculates the AE evaluation valueby means of a weighted calculation of luminance values of a set of theabove six sub-AE areas 1-6. More specifically, the first arithmeticmodule 1079 outputs luminance data for each picture element (pixel) ofan image received by the CCD 103 to the AE evaluation circuit 1082. TheAE evaluation circuit 1082 adds up the received pixel luminance data foreach of the six sub-AE areas 1-6 to obtain a luminance value for eacharea. The AE evaluation circuit 1082 then performs a weightedcalculation of the set of six luminance values for the six sub-AE areas1-6 to obtain a calculated value as the AE evaluation value for theimage received by the CCD 103.

[0042]FIG. 6 illustrates an exemplary AF area used for determining theAF evaluation value. An AF area 1 is identical to the sub-AE area 6 inFIG. 5. FIG. 7 illustrates an exemplary AF area used for determining theAF evaluation value when an image to be photographed is dark or low incontrast. An AF area 2 is identical to the AE area 5 in FIG. 5.

[0043] As described above, the first arithmetic module 1079 detects theintensity of a luminance signal received by the CCD 103 and the bandpass filter (BPF) 1080 passes a high frequency component of theluminance signal. The AF evaluation circuit 1081 then calculates theintegral of the digital values according to the luminance signals passedthrough the AF area to obtain an AF evaluation which is output to theCPU 121.

[0044] Next, an operation of the digital camera is explained. Generally,when an image to be photographed includes a plurality of images whichare located at different distances, or an image to be photographed isdeep or three-dimensional, if the AF area for obtaining an AF evaluationvalue is large, the image which the photographer desires to focus on istypically not focused. Therefore, the AF area typically cannot be madeexcessively large. Furthermore, when the image to be photographed isexcessively small, the focus typically cannot be adjusted on the image.On the other hand, when an image to be photographed is dark or low incontrast, a precise focusing typically is enabled if the AF area is madelarge. Accordingly, in this embodiment, when an image to be photographedis dark or low in contrast, even when the image is deep orthree-dimensional, the AF area is made large so as to accomplish precisefocusing.

[0045] In an AE control operation, the CPU 121 controls the shutterspeed and the gain of the VG amplifier 105 such that the AE evaluationvalue becomes a criterion exposure value for an optimum exposure. Inthis embodiment, for simplifying the explanation the aperture value isfixed at, for example, 4 (i.e., the f-number is 4). Furthermore, in anAF control operation, after the shutter speed and the gain of the VGamplifier are set by the CPU 121, the CPU 121 obtains the AF evaluationvalue while moving the focus lens 101 a via the focus driver 131 bydriving the stepping motor 132 with a predetermined number of pulses ina period of 1 Vd. The CPU 121 drives the focusing lens 101 a to thefocusing position which is determined in accordance with the peakposition of the AF evaluation value.

[0046]FIG. 8 is a flowchart for explaining an operation for setting anAF area, which is executed by the CPU 121.

[0047] In FIG. 8, in step S1, the AF area 1 (FIG. 6) is set in the AFarea by registering data values “from_af lwdx” and “from_aflwdy” inregisters “aflwdx” and “aflwdy” of the IPP 107. Step S2 then determinesif the luminance value Lv (“lv_value”) is smaller than a lowest limitvalue “af_dark_thrd.” If the luminance value Lv is not smaller than thelowest limit value “af_dark_thrd,” an AE control operation (illustratedin FIG. 9) is performed while the AF control operation is being executedusing the AF area 1. If the luminance value Lv is smaller than thelowest limit value “af_dark_thrd,” the CPU 121 determines that the imageis dark and then in step S3 the CPU 121 determines if the AF evaluationvalue “now_af_a” is smaller than the lowest limit value“af_dark_now_af_a”. If the AF evaluation value “now_af_a” is smallerthan the lowest limit value “af_dark_now_af_a,” the AF control operationis stopped in step S4. If the AF evaluation value “now_af_a” is notsmaller than the lowest limit value “af_dark_now_af_a,” the processproceeds to the step S5 to register data for setting the AF area 2 (FIG.7), “from_dark_aflwdx” and “from_dark_af_lwdy,” to the registers“aflwdx” and “aflwdy” in the IPP 107. Thus, the AF area 2 is set in theAF area, and the AE control operation (FIG. 9) is performed while the AFcontrol operation is being performed using the AF area 2.

[0048]FIG. 9 is a flowchart explaining an AE control operation which isexecuted while an AF control operation is being executed by the CPU 121.

[0049] In FIG. 9, the luminance value Lv (“lv_value”) is obtained inaccordance with the AE evaluation value in the AF area (the AE area 6 inFIG. 5) in step S10. Then, a manual exposure correction value(“exp_value”) is set to zero in step S11 and a back light correctionvalue (“offset_value”) is obtained in step S12. The exposure value(“ev_value”) is calculated in step S13 in accordance the followingequation:

ev_value=lv_value+offset_value+exp_value

[0050] Then, in step S14, it is determined if the exposure value(“ev_value”) is larger than the sum of the aperture value (“av_value”),which is 4 in this embodiment, and the minimum shutter speed for themonitoring mode (“monita_lo_tv”), which is {fraction (1/30)} of a secondin this embodiment. If the exposure value (“ev_value”) is larger thanthe sum of the aperture value (“av_value”) and the minimum shutter speedfor the monitoring mode (“monita_lo_tv”), the shutter speed value(“tv_value”) is made equal to the difference of the exposure value(“ev_value”) minus the aperture value (“av_value”) in step S15. If theexposure value (“ev_value”) is smaller than the sum of the aperturevalue (“av_value”) and the minimum shutter speed for the monitoring mode(“monita_lo_tv”), then, the shutter speed value (“tv_value”) is madeequal to the minimum shutter speed for the monitoring mode(“monita_lo_tv”) in step S20, and the process proceed to step S16.

[0051] In the step S16, flickering of a fluorescent light is checked andthe shutter speed for the CCD 103 is set to the minimum shutter speedfor the monitoring mode (“monita_lo_tv”) in step S17. When the CCD 103is controlled so as to output a luminance signal only from predeterminedCCD elements and disabled from outputting a luminance signal from theother CCD elements, for reducing the period of time of outputting theluminance signals from the CCD 103, the shutter speed for the CCD 103 isset after shifting data for setting the shutter speed in correspondenceto the number of the disabled CCD elements.

[0052] Then, in step S18, the gain setting value for setting the gain ofthe VG amplifier 105 (“agc_value”) is calculated by summing the VGamplifier correction value (“agc_tv_value”) for correcting aquantization error of the shutter, the aperture value (“av_value”),which is 4 in this embodiment, and the shutter speed value (“tv_value”)and then subtracting therefrom the exposure value (“ex_value”). Then,the gain setting value (“agc_value”) is set at the VG amplifier 105 instep S19. The maximum gain setting value (“agc_value”) for themonitoring mode is plus 12 dB, which is equivalent to increasing twosteps of the exposure value, and the maximum gain setting value(“agc_value”) while the AF control operation is being executed is plus18 dB, which is equivalent to increasing three steps of the exposurevalue.

[0053] In the monitoring mode, if the gain of the VG amplifier 105 isexcessively increased, AE control or AWB control operations typicallycannot be accurately performed. Therefore, the gain of the VG amplifier105 typically cannot be excessively increased in the monitoring mode.

[0054] On the other hand, in the AF control operation, the magnitude ofthe AF evaluation value itself is not required for the control and theAF control can be performed only with information regarding increasingor decreasing of the AF evaluation value. Therefore, when an image to bephotographed is dark or low in contrast and if there exists apossibility that the image cannot be in focus, the possibility offocusing the image can be increased by increasing the gain of the VGamplifier 105. Therefore, in this embodiment, when an AF controloperation is executed for an image to be photographed which is dark orlow in contrast, the gain of the VG amplifier 105 is increased higherthan the gain of the VG amplifier 105 in the monitoring mode and therebythe possibility of focusing the image is increased.

[0055] Furthermore, because the AF area is generally smaller than the AEarea, when only the AF area is dark, if an AF operation is performedusing the AE area which is used in the monitoring mode and the AFevaluation value is calculated by integrating the high frequencycomponents of luminance signals which are extracted from luminancesignals by the BPF 1080, the AF evaluation value is calculated basedupon the luminance signal which is not optimum for the AF area.Therefore, the increase or decrease of the AF evaluation value is smalland the accuracy of focusing typically deteriorates. In this embodiment,therefore, an AF control operation is executed after an AE controloperation for the AF area is performed.

[0056] The mechanisms and processes set forth in the present descriptionmay be implemented using a conventional general purpose microprocessorprogrammed according to the teachings in the present specification, aswill be appreciated to those skilled in the relevant art(s). Appropriatesoftware coding can readily be prepared by skilled programmers based onthe teachings of the present disclosure, as will also be apparent tothose skilled in the relevant art(s).

[0057] The present invention thus also includes a computer-based productwhich may be hosted on a storage medium and include instructions whichcan be used to program a microprocessor to perform a process inaccordance with the present invention. This storage medium can include,but is not limited to, any type of disk including floppy disks, opticaldisks, CD-ROMs, magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs,flash memory, magnetic or optical cards, or any type of media suitablefor storing electronic instructions.

[0058] Obviously, numerous modifications and variations of the presentinvention are possible in light of the above teachings. It is thereforeto be understood that within the scope of the appended claims, theinvention may be practiced otherwise than as specifically describedherein.

[0059] This document claims priority and contains subject matter relatedto Japanese patent application No. 09-336384 filed in the Japanesepatent Office on Nov. 19, 1997, the entire contents of which are herebyincorporated by reference.

What is claimed as new and is desired to be secured by Letters Patentsof the United States:
 1. An automatic focusing device for a digitalcamera, comprising: an optical system including a focusing lens system;an imaging device which receives a light flux from an object to bephotographed, the received light flux being passed through the opticalsystem to form an image of the object, and converts the received lightflux into an output image signal; analog-to-digital converting means forconverting the image signal to output digital image data; automaticexposure (AE) evaluation value outputting means for outputting luminancedata according to the digital image data as an AE evaluation value;automatic focusing (AF) area setting means for setting at least an areaof an imaging screen of the imaging device as an AF area; AF areaenlarging means for determining if the AE evaluation value is smallerthan a predetermined value and setting an enlarged AF area as the AFarea when the AE evaluation value is smaller than the predeterminedvalue; AF evaluation value outputting means for integrating highfrequency components of luminance data of image data in the AF area andoutputting resulting data as an AF evaluation value; AF evaluation valuesampling means for enabling the AF evaluation value outputting means tosample AF evaluation values output by the AF evaluation value outputtingmeans while moving the focusing lens system; and focusing lens drivingmeans for determining if the device is in focus based upon a result ofsampling the AF evaluation values and driving the focusing lens systemto a focusing position when the device is not in focus.
 2. An automaticfocusing device for a digital camera, comprising: an optical systemincluding a focusing lens system; an imaging device which receives alight flux from an object to be photographed, the received light fluxbeing passed through the optical system to form an image of the object,and converts the received light flux into an output image signal;analog-to-digital converting means for converting the image signal tooutput digital image data; automatic exposure (AE) evaluation valueoutputting means for outputting luminance data according to the digitalimage data as an AE evaluation value; automatic focusing (AF) areasetting means for setting at least an area of an imaging screen of theimaging device as an AF area; AF evaluation value outputting means forintegrating high frequency components of luminance data of image data inthe AF area and outputting resulting data as an AF evaluation value; AFevaluation value sampling means for enabling the AF evaluation valueoutputting means to sample AF evaluation values output by the AFevaluation value outputting means while moving the focusing lens system;focusing lens driving means for determining if the device is in focusbased upon a result of sampling the AF evaluation values and driving thefocusing lens system to a focusing position when the device is not infocus; and AF area enlarging means for setting an enlarged AF area asthe AF area before the AF evaluation value sampling means samples the AFevaluation values when the AF evaluation value is smaller than apredetermined value.
 3. An automatic focusing device for a digitalcamera, comprising: an optical system including a focusing lens system;an imaging device which receives a light flux from an object to bephotographed, the received light flux being passed through the opticalsystem to form an image of the object, and converts the received lightflux into an output image signal; variable gain amplifying means foramplifying the image signal with a variable gain; analog-to-digitalconverting means for converting the image signal to output digital imagedata; automatic exposure (AE) evaluation value outputting means foroutputting luminance data according to the digital image data as an AEevaluation value; automatic focusing (AF) evaluation value outputtingmeans for integrating high frequency components of luminance data ofimage data in an AF area and outputting resulting data as an AFevaluation value; AF evaluation value sampling means for enabling the AFevaluation value outputting means to sample AF evaluation values outputby the AF evaluation value outputting means while moving the focusinglens system; focusing lens driving means for determining if the deviceis in focus based upon a result of sampling the AF evaluation values anddriving the focusing lens system to a focusing position when the deviceis not in focus; and gain control means for controlling the variablegain amplifying means to increase the gain of the variable gainamplifying means while the AF evaluation value sampling means issampling the AF evaluation values and when the AE evaluation value issmaller than a predetermined value.
 4. An automatic focusing device fora digital camera, comprising: an optical system including a focusinglens system; an imaging device which receives a light flux from anobject to be photographed, the received light flux being passed throughthe optical system to form an image of the object, and converts thereceived light flux into an output image signal; variable gainamplifying means for amplifying the image signal with a variable gain;analog-to-digital converting means for converting the image signal tooutput digital image data; automatic exposure (AE) evaluation valueoutputting means for outputting luminance data according to the digitalimage data as an AE evaluation value; automatic focusing (AF) evaluationvalue outputting means for integrating high frequency components ofluminance data of image data in an AF area and outputting resulting dataas an AF evaluation value; AF evaluation value sampling means forenabling the AF evaluation value outputting means to sample AFevaluation values output by the AF evaluation value outputting meanswhile moving the focusing lens system; focusing lens driving means fordetermining if the device is in focus based upon a result of samplingthe AF evaluation values and driving the focusing lens system to afocusing position when the device is not in focus; and gain controlmeans for controlling the variable gain amplifying means to increase thegain of the variable gain amplifying means while the AF evaluation valuesampling means is sampling the AF evaluation values, when the AFevaluation value is smaller than a predetermined value before the AFevaluation value sampling means samples the AF evaluation values.
 5. Anautomatic focusing device for a digital camera, comprising: an opticalsystem including a focusing lens system; an imaging device whichreceives a light flux from an object to be photographed, the receivedlight flux being passed through the optical system to form an image ofthe object, and converts the received light flux into an output imagesignal; analog-to-digital converting means for converting the imagesignal to output digital image data; automatic exposure (AE) evaluationvalue outputting means for outputting luminance data according to thedigital image data as an AE evaluation value; automatic focusing (AF)evaluation value outputting means for integrating high frequencycomponents of luminance data of image data in an AF area and outputtingresulting data as an AF evaluation value; AF evaluation value samplingmeans for enabling the AF evaluation value outputting means to sample AFevaluation values output by the AF evaluation value outputting meanswhile moving the focusing lens system; focusing lens driving means fordetermining if the device is in focus based upon a result of samplingthe AF evaluation values and driving the focusing lens system to afocusing position when the device is not in focus; AE control means forcontrolling an AE control operation in accordance with the AE evaluationvalue output by the AE evaluation value outputting means; and AE settingmeans for setting an AE evaluation value for an AF area independentlyfrom the AE control operation by the AE control means; wherein, an AFoperation is executed after the AE operation for the AF area isperformed by the AE setting means for the AF area.
 6. A method forcontrolling an automatic focusing device of a digital camera,comprising: receiving a light flux from an object to be photographed,the received light flux being passed through an optical system having afocusing lens system to form an image of the object and converting thereceived light flux into an output image signal; converting the imagesignal to output digital image data; outputting luminance data accordingto the digital image data as an automatic exposure (AE) evaluationvalue; setting at least an area of an imaging screen of an imagingdevice as an automatic focusing (AF) area; determining if the AEevaluation value is smaller than a predetermined value and setting anenlarged AF area as the AF area when the AE evaluation value is smallerthan the predetermined value; integrating high frequency components ofluminance data of image data in the AF area and outputting resultingdata as an AF evaluation value; sampling AF evaluation values whilemoving the focusing lens system; and determining if the device is infocus based upon a result of the sampled AF evaluation values anddriving the focusing lens system to a focusing position when the deviceis not in focus.
 7. A method for controlling an automatic focusingdevice of a digital camera, comprising: receiving a light flux from anobject to be photographed, the received light flux being passed throughan optical system having a focusing lens system to form an image of theobject and converting the received light flux into an output imagesignal; converting the image signal to output digital image data;outputting luminance data according to the digital image data as anautomatic exposure (AE) evaluation value; setting at least an area of animaging screen of an imaging device as an automatic focusing (AF) area;integrating high frequency components of luminance data of image data inthe AF area and outputting resulting data as an AF evaluation value;sampling AF evaluation values while moving the focusing lens system; anddetermining if the device is in focus based upon a result of the sampledAF evaluation values and driving the focusing lens system to a focusingposition when the device is not in focus; and setting an enlarged AFarea as the AF area before sampling the AF evaluation values when the AFevaluation value is smaller than a predetermined value.
 8. A method forcontrolling an automatic focusing device of a digital camera,comprising: receiving a light flux from an object to be photographed,the received light flux being passed through an optical system having afocusing lens system to form an image of the object and converting thereceived light flux into an output image signal; amplifying the imagesignal with a variable gain; converting the image signal to outputdigital image data; outputting luminance data according to the digitalimage data as an automatic exposure (AE) evaluation value; integratinghigh frequency components of luminance data of image data in anautomatic focusing (AF) area and outputting resulting data as an AFevaluation value; sampling AF evaluation values while moving thefocusing lens system; determining if the device is in focus based upon aresult of the sampled AF evaluation values and driving the focusing lenssystem to a focusing position when the device is not in focus; andcontrolling the variable gain to increase the variable while samplingthe AF evaluation values and when the AE evaluation value is smallerthan a predetermined value.
 9. A method for controlling an automaticfocusing device of a digital camera, comprising: receiving a light fluxfrom an object to be photographed, the received light flux being passedthrough an optical system having a focusing lens system to form an imageof the object and converting the received light flux into an outputimage signal; amplifying the image signal with a variable gain;converting the image signal to output digital image data; outputtingluminance data according to the digital image data as an automaticexposure (AE) evaluation value; integrating high frequency components ofluminance data of image data in an automatic focusing (AF) area andoutputting resulting data as an AF evaluation value; sampling AFevaluation values while moving the focusing lens system; determining ifthe device is in focus based upon a result of the sampled AF evaluationvalues and driving the focusing lens system to a focusing position whenthe device is not in focus; and controlling the variable gain toincrease the variable while sampling the AF evaluation values, when theAF evaluation value is smaller than a predetermined value before thesampling the AF evaluation values.
 10. A method for controlling anautomatic focusing device of a digital camera, comprising: receiving alight flux from an object to be photographed, the received light fluxbeing passed through an optical system having a focusing lens system toform an image of the object and converting the received light flux intoan output image signal; converting the image signal to output digitalimage data; outputting luminance data according to the digital imagedata as an automatic exposure (AE) evaluation value; integrating highfrequency components of luminance data of image data in an automaticfocusing (AF) area and outputting resulting data as an AF evaluationvalue; sampling AF evaluation values while moving the focusing lenssystem; determining if the device is in focus based upon a result of thesampled AF evaluation values and driving the focusing lens system to afocusing position when the device is not in focus; controlling an AEcontrol operation in accordance with the AE evaluation value; settingthe AE evaluation value for the AF area independently from the AEcontrol operation; and executing an AF operation after the AE operationfor the AF area.
 11. A computer readable medium storing computerinstructions for controlling an automatic focusing device of a digitalcamera, by performing the steps of: receiving a light flux from anobject to be photographed, the received light flux being passed throughan optical system having a focusing lens system to form an image of theobject and converting the received light flux into an output imagesignal; converting the image signal to output digital image data;outputting luminance data according to the digital image data as anautomatic exposure (AE) evaluation value; setting at least an area of animaging screen of an imaging device as an automatic focusing (AF) area;determining if the AE evaluation value is smaller than a predeterminedvalue and setting an enlarged AF area as the AF area when the AEevaluation value is smaller than the predetermined value; integratinghigh frequency components of luminance data of image data in the AF areaand outputting resulting data as an AF evaluation value; sampling AFevaluation values while moving the focusing lens system; and determiningif the device is in focus based upon a result of the sampled AFevaluation values and driving the focusing lens system to a focusingposition when the device is not in focus.
 12. A computer readable mediumstoring computer instructions for controlling an automatic focusingdevice of a digital camera, by performing the steps of: receiving alight flux from an object to be photographed, the received light fluxbeing passed through an optical system having a focusing lens system toform an image of the object and converting the received light flux intoan output image signal; converting the image signal to output digitalimage data; outputting luminance data according to the digital imagedata as an automatic exposure (AE) evaluation value; setting at least anarea of an imaging screen of an imaging device as an automatic focusing(AF) area; integrating high frequency components of luminance data ofimage data in the AF area and outputting resulting data as an AFevaluation value; sampling AF evaluation values while moving thefocusing lens system; and determining if the device is in focus basedupon a result of the sampled AF evaluation values and driving thefocusing lens system to a focusing position when the device is not infocus; and setting an enlarged AF area as the AF area before samplingthe AF evaluation values when the AF evaluation value is smaller than apredetermined value.
 13. A computer readable medium storing computerinstructions for controlling an automatic focusing device of a digitalcamera, by performing the steps of: receiving a light flux from anobject to be photographed, the received light flux being passed throughan optical system having a focusing lens system to form an image of theobject and converting the received light flux into an output imagesignal; amplifying the image signal with a variable gain; converting theimage signal to output digital image data; outputting luminance dataaccording to the digital image data as an automatic exposure (AE)evaluation value; integrating high frequency components of luminancedata of image data in an automatic focusing (AF) area and outputtingresulting data as an AF evaluation value; sampling AF evaluation valueswhile moving the focusing lens system; determining if the device is infocus based upon a result of the sampled AF evaluation values anddriving the focusing lens system to a focusing position when the deviceis not in focus; and controlling the variable gain to increase thevariable while sampling the AF evaluation values and when the AEevaluation value is smaller than a predetermined value.
 14. A computerreadable medium storing computer instructions for controlling anautomatic focusing device of a digital camera, by performing the stepsof: receiving a light flux from an object to be photographed, thereceived light flux being passed through an optical system having afocusing lens system to form an image of the object and converting thereceived light flux into an output image signal; amplifying the imagesignal with a variable gain; converting the image signal to outputdigital image data; outputting luminance data according to the digitalimage data as an automatic exposure (AE) evaluation value; integratinghigh frequency components of luminance data of image data in anautomatic focusing (AF) area and outputting resulting data as an AFevaluation value; sampling AF evaluation values while moving thefocusing lens system; determining if the device is in focus based upon aresult of the sampled AF evaluation values and driving the focusing lenssystem to a focusing position when the device is not in focus; andcontrolling the variable gain to increase the variable while samplingthe AF evaluation values, when the AF evaluation value is smaller than apredetermined value before the sampling the AF evaluation values.
 15. Acomputer readable medium storing computer instructions for controllingan automatic focusing device of a digital camera, by performing thesteps of: receiving a light flux from an object to be photographed, thereceived light flux being passed through an optical system having afocusing lens system to form an image of the object and converting thereceived light flux into an output image signal; converting the imagesignal to output digital image data; outputting luminance data accordingto the digital image data as an automatic exposure (AE) evaluationvalue; integrating high frequency components of luminance data of imagedata in an automatic focusing (AF) area and outputting resulting data asan AF evaluation value; sampling AF evaluation values while moving thefocusing lens system; determining if the device is in focus based upon aresult of the sampled AF evaluation values and driving the focusing lenssystem to a focusing position when the device is not in focus;controlling an AE control operation in accordance with the AE evaluationvalue; setting the AE evaluation value for the AF area independentlyfrom the AE control operation; and executing an AF operation after theAE operation for the AF area.